package com.yinhe.music.yhmusic.base;

import com.yinhe.music.type.person.BaseInfo;
import com.yinhe.music.yhmusic.instrument.InstrumentBean;
import com.yinhe.music.yhmusic.model.AlbumInfo;
import com.yinhe.music.yhmusic.model.CommentList;
import com.yinhe.music.yhmusic.model.HomeInfo;
import com.yinhe.music.yhmusic.model.LangResp;
import com.yinhe.music.yhmusic.model.LoginInfo;
import com.yinhe.music.yhmusic.model.Music;
import com.yinhe.music.yhmusic.model.MvsInfo;
import com.yinhe.music.yhmusic.model.PayResultInfo;
import com.yinhe.music.yhmusic.model.ProductInfo;
import com.yinhe.music.yhmusic.model.RadioClassify;
import com.yinhe.music.yhmusic.model.RadioListInfo;
import com.yinhe.music.yhmusic.model.SearchInfo;
import com.yinhe.music.yhmusic.model.SingerList;
import com.yinhe.music.yhmusic.model.SongMenuList;
import com.yinhe.music.yhmusic.model.Tags;
import com.yinhe.music.yhmusic.model.UserContent;
import com.yinhe.music.yhmusic.model.UserInfo;
import com.yinhe.music.yhmusic.model.ValidCodeInfo;
import com.yinhe.music.yhmusic.network.NetworkManager;
import com.yinhe.music.yhmusic.network.response.Response;
import com.yinhe.music.yhmusic.pay.PayInfo;
import com.yinhe.music.yhmusic.personal.model.VipListInfo;
import com.yinhe.music.yhmusic.search.model.BriefSearchInfo;
import com.yinhe.music.yhmusic.search.model.HotSearchInfo;
import com.yinhe.music.yhmusic.share.ShareInfoResponse;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;

/**
 * 基础model层，主要进行网络数据操作
 *
 * @author 何晓华
 */
public class BaseModel implements IBaseModel {

    @Override
    public Observable<Response<BaseInfo>> feedBack(String content) {
        return NetworkManager.getWebService().feedBack(content);
    }

    @Override
    public Observable<Response<InstrumentBean.InstrumentListBean>> getInstrumentInfo(int instrumentId) {
        return NetworkManager.getWebService().getInstrumentInfo(instrumentId);
    }

    @Override
    public Observable<Response<UserContent>> getUserContent(String userId, String type, int page, int pageSize) {
        return NetworkManager.getWebService().getUserContent(userId, type, page, pageSize);
    }

    @Override
    public Observable<Response<UserInfo>> getOtherUserInfo(String userId) {
        return NetworkManager.getWebService().getOtherUserInfo(userId);
    }

    @Override
    public Observable<Response<MvsInfo>> getMvInfo(int id) {
        return NetworkManager.getWebService().getMvInfo(id);
    }

    @Override
    public Observable<Response<HotSearchInfo>> getHotSearch() {
        return NetworkManager.getWebService().getHotSearch();
    }

    @Override
    public Observable<Response<Music>> getNewSongList() {
        return NetworkManager.getWebService().getNewSongList();
    }

    @Override
    public Observable<Response<LoginInfo>> setPassword(String type, String phone, String validCode, String password) {
        return NetworkManager.getWebService().setPassword(type, phone, validCode, password);
    }

    @Override
    public Observable<Response<ValidCodeInfo>> checkValidCode(String validCode, String phone) {
        return NetworkManager.getWebService().checkValidCode(validCode, phone);
    }

    @Override
    public Observable<Response<VipListInfo>> getProductsList(String type) {
        return NetworkManager.getWebService().getProductsList(type);
    }

    @Override
    public Observable<Response<ProductInfo>> getProductInfo(String productType, String product) {
        return NetworkManager.getWebService().getProductInfo(productType, product);
    }

    @Override
    public Observable<Response<PayResultInfo>> getPayResult(String orderNo) {
        return NetworkManager.getWebService().getPayResult(orderNo);
    }

    @Override
    public Observable<Response<PayInfo>> getPayInfo(String payType, String productType, String product) {
        return NetworkManager.getWebService().getPayInfo(payType, productType, product);
    }

    @Override
    public Observable<Response<LoginInfo>> thirdPartLogin(String unionid, String platformId, String platform, String nickname, String gender, String image) {
        return NetworkManager.getWebService().thirdPartLogin(unionid, platformId, platform, nickname, gender, image);
    }

    @Override
    public Observable<Response<InstrumentBean>> getInstrumentList() {
        return NetworkManager.getWebService().getInstrumentList();
    }

    @Override
    public Observable<Response<Music>> getBoughtMusicList() {
        return NetworkManager.getWebService().getBoughtMusicList();
    }

    @Override
    public Observable<Response<SingerList>> getCollectSinger(int curPage, int pageSize) {
        return NetworkManager.getWebService().getCollectSinger(curPage, pageSize);
    }

    @Override
    public Observable<Response<AlbumInfo>> getCollectAlbum(int curPage, int pageSize) {
        return NetworkManager.getWebService().getCollectAlbum(curPage, pageSize);
    }

    @Override
    public Observable<Response<MvsInfo>> getCollectMovie(int curPage, int pageSize) {
        return NetworkManager.getWebService().getCollectMovie(curPage, pageSize);
    }

    @Override
    public Observable<Response<RadioListInfo>> getMyRadio(int curPage, int pageSize) {
        return NetworkManager.getWebService().getMyRadio(curPage, pageSize);
    }

    @Override
    public Observable<Response<LangResp>> getSongClassify() {
        return NetworkManager.getWebService().getSongClassify();
    }

    @Override
    public Observable<Response<Music>> getClassifySongs(int classify) {
        return NetworkManager.getWebService().getClassifySongs(classify);
    }

    @Override
    public Observable<Response<BriefSearchInfo>> getSearchTips(String keyWords) {
        return NetworkManager.getWebService().getSearchTips(keyWords);
    }

    @Override
    public Observable<Response<Music>> getMusicInfo(int musicId) {
        return NetworkManager.getWebService().getMusicInfo(musicId);
    }

    @Override
    public Observable<Response<BaseInfo>> getMusicUrl(int musicId, String quality) {
        return NetworkManager.getWebService().getMusicUrl(musicId, quality);
    }

    @Override
    public Observable<Response<BaseInfo>> batchDownload(String idList, String quality) {
        return NetworkManager.getWebService().batchDownload(idList, quality);
    }

    @Override
    public Observable<Response<SongMenuList>> getSongMenuInfo(int id) {
        return NetworkManager.getWebService().getSongMenuInfo(id);
    }

    @Override
    public Observable<Response<SongMenuList>> getSongMenuList(int page, int pageSize, String type) {
        return NetworkManager.getWebService().getSongMenuList(page, pageSize, type);
    }

    @Override
    public Observable<Response<Music>> getMusicList(String songType, int id, String page, String pageSize) {
        return NetworkManager.getWebService().getMusicList(songType, id, page, pageSize);
    }

    @Override
    public Observable<Response<AlbumInfo>> getAlbumInfo(int id) {
        return NetworkManager.getWebService().getAlbumInfo(id);
    }

    @Override
    public Observable<Response<AlbumInfo>> getAlbumList(int page, int pageSize) {
        return NetworkManager.getWebService().getAlbumList(page, pageSize);
    }

    @Override
    public Observable<Response<AlbumInfo>> getAlbumMusic(int page, int pageSize, int id) {
        return NetworkManager.getWebService().getAlbumMusic(page, pageSize, id);
    }

    @Override
    public Observable<Response<SingerList>> getSingerInfo(int id) {
        return NetworkManager.getWebService().getSingerInfo(id);
    }

    @Override
    public Observable<Response<SingerList>> getSingerList() {
        return NetworkManager.getWebService().getSingerList();
    }

    @Override
    public Observable<Response<AlbumInfo>> getSingerAlbum(String albumType, int page, int pageSize, int id) {
        return NetworkManager.getWebService().getSingerAlbum(albumType, id, page, pageSize);
    }

    @Override
    public Observable<Response<MvsInfo>> getSingerMvs(String movieType, int page, int pageSize, int id) {
        return NetworkManager.getWebService().getSingerMvs(movieType, id, page, pageSize);
    }

    @Override
    public Observable<Response<BaseInfo>> batchCollection(String idList, String radioIdList, String collectType) {
        return NetworkManager.getWebService().batchCollection(idList, radioIdList, collectType);
    }

    @Override
    public Observable<Response<BaseInfo>> batchUnCollection(String idList, String radioIdList, String collectType) {
        return NetworkManager.getWebService().batchUnCollection(idList, radioIdList, collectType);
    }

    @Override
    public Observable<Response<BaseInfo>> deleteUserSongMenu(String idList) {
        return NetworkManager.getWebService().deleteUserSongMenu(idList);
    }

    @Override
    public Observable<Response<BaseInfo>> createUserSongMenu(String songMenuName) {
        return NetworkManager.getWebService().createUserSongMenu(songMenuName);
    }

    @Override
    public Observable<Response<LoginInfo>> requestLogin(String pNum, String password) {
        return NetworkManager.getWebService().login(pNum, password);
    }

    @Override
    public Observable<Response<UserInfo>> reqUserInfo() {
        return NetworkManager.getWebService().getUserInfo();
    }

    @Override
    public Observable<Response<HomeInfo>> getRecommendBanners() {
        return NetworkManager.getWebService().getRecommendBanners();
    }

    @Override
    public Observable<Response<HomeInfo>> getRecommendSongs(int curPage, int pageSize) {
        return NetworkManager.getWebService().getRecommendSongs(curPage, pageSize);
    }

    @Override
    public Observable<Response<HomeInfo>> getRecommendNewSongs(int curPage, int pageSize) {
        return NetworkManager.getWebService().getRecommendNewSongs(curPage, pageSize);
    }

    @Override
    public Observable<Response<HomeInfo>> getRecommendSongMenus(int curPage, int pageSize) {
        return NetworkManager.getWebService().getRecommendSongMenus(curPage, pageSize);
    }

    @Override
    public Observable<Response<HomeInfo>> getRecommendMvs(int curPage, int pageSize) {
        return NetworkManager.getWebService().getRecommendMvs(curPage, pageSize);
    }

    @Override
    public Observable<Response<RadioListInfo>> getRadioList(int mPageSize, int mPage, int bannerNum, int radioClassifyId, String sort) {
        return NetworkManager.getWebService().getRadioList(mPageSize, mPage, bannerNum, radioClassifyId, sort);
    }

    @Override
    public Observable<Response<RadioClassify>> getRadioClassify(int mPageSize, int mPage) {
        return NetworkManager.getWebService().getRadioClassify(mPageSize, mPage);
    }

    @Override
    public Observable<Response<RadioListInfo>> getRadioInfo(int id) {
        return NetworkManager.getWebService().getRadioInfo(id);
    }

    @Override
    public Observable<Response<RadioListInfo>> getRadioSong(int id, int pageSize, int page) {
        return NetworkManager.getWebService().getRadioSong(id, pageSize, page);
    }

    @Override
    public Observable<Response<MvsInfo>> getMvList(int page, int pageSize, int classifyId) {
        return NetworkManager.getWebService().getMvList(page, pageSize, classifyId);
    }

    @Override
    public Observable<Response<Tags>> getTags(String type) {
        return NetworkManager.getWebService().getTags(type);
    }

    @Override
    public Observable<Response<BaseInfo>> mvLike(int mvId) {
        return NetworkManager.getWebService().mvLike(mvId);
    }

    @Override
    public Observable<Response<BaseInfo>> mvUnLike(int mvId) {
        return NetworkManager.getWebService().mvUnLike(mvId);
    }

    @Override
    public Observable<Response<SearchInfo>> getSearchList(int page, int pageSize, String keyWords, String messageList) {
        return NetworkManager.getWebService().getSearchList(page, pageSize, keyWords, messageList);
    }

    @Override
    public Observable<Response<BaseInfo>> addSongToUserSongMenu(int id, String songIdList) {
        return NetworkManager.getWebService().addSongToUserSongMenu(id, songIdList);
    }

    @Override
    public Observable<Response<BaseInfo>> deleteUserSongMenuSong(int id, String songIdList) {
        return NetworkManager.getWebService().deleteUserSongMenuSong(id, songIdList);
    }

    @Override
    public Observable<Response<BaseInfo>> collect(int id, String collectType) {
        return NetworkManager.getWebService().collect(id, collectType);
    }

    @Override
    public Observable<Response<BaseInfo>> unCollect(int id, String collectType) {
        return NetworkManager.getWebService().unCollect(id, collectType);
    }

    @Override
    public Observable<Response<CommentList>> getCommentList(int id, String commentType, int curPage, int pageSize) {
        return NetworkManager.getWebService().getCommentList(id, commentType, curPage, pageSize);
    }

    @Override
    public Observable<Response<BaseInfo>> comment(int id, String commentType, String content) {
        return NetworkManager.getWebService().comment(id, commentType, content);
    }

    @Override
    public Observable<ResponseBody> modifyUserImage(String url, MultipartBody.Part part) {
        return NetworkManager.getWebService().modifyUserImage(url, part);
    }

    @Override
    public Observable<Response<BaseInfo>> modifyInfo(String url, String nickName, String gender, String songMenuName) {
        return NetworkManager.getWebService().modifyInfo(url, nickName, gender, songMenuName);
    }

    @Override
    public Observable<Response<BaseInfo>> getValidCode(String type, String phone) {
        return NetworkManager.getWebService().getValidCode(type, phone);
    }

    @Override
    public Observable<Response<ShareInfoResponse>> getShareInfo(int id, String shareType) {
        return NetworkManager.getWebService().getShareInfo(id, shareType);
    }
}
